<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>04模板语法</title>
</head>
<body>

  <div id='app'>
    {{msg}}
    <!-- {{ act() }} -->
    {{isShow ? 'show' : 'hide'}}
  </div>

<script src='https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js'></script>
<script>
  const data = "你好 世界"
  const app = new Vue({
    el: '#app'
    ,data:{
      msg: 'Hello Vue'
      ,msg2: '你好 Vue'
      ,isShow: true
    }
    ,methods: {
      act() {
        console.log(111);
        return "act"
      }
      ,act2() {
        console.log(222);
      }
    }
  })
  console.log(app);
  // document.onclick = function(){
  //   app.msg = "数据改变了"
  // }
</script>
</body>
</html>